
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>Summary Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stylesheets/printing.css" media="screen" rel="Stylesheet" type="text/css" />
</head>
		
<body leftmargin="0" rightmargin="0" topmargin="0" background="#E4EED4">
<br>
<center><span style=" text-decoration:underline; font-weight:bold;">Senarai Pelawat Pada Bulan <?=$_month_lgnames[sprintf("%d",$month)]?>, <?=$year?></span></center>
<br>
<table border="1" cellspacing="0" bgcolor="">
  <tr valign="middle" bgcolor="#663300" align="center">
    <td width="20" height="20" bgcolor="#CCCCCC" class="tableMainHeaderFont"><b>Bil</b></td>
    <td width="272" bgcolor="#CCCCCC" class="tableMainHeaderFont"><b>Nama</b></td>
    <td width="100" bgcolor="#CCCCCC" class="tableMainHeaderFont"><b>Tarikh&Masa</b></td>
    <td width="145" bgcolor="#CCCCCC" class="tableMainHeaderFont"><b>Dari Mana?</b></td>
    <td width="145" bgcolor="#CCCCCC" class="tableMainHeaderFont"><b>Photo</b></td>
  </tr>
  <?php
  $bil = 1;
  while($dat = pg_fetch_object($res)){
  	$photofile = "images/".$dat->ic_new.".jpg";
  	if ( ($dat->ic_new != '') && (is_file($photofile)) ) $photo = "<img width=50 src=\"$photofile\">";
	else $photo = '&nbsp;';
	
	$dat->hari = sprintf("%02d",$dat->hari);
	$dat->bulan = sprintf("%02d",$dat->bulan);
	$tarikh = "$dat->hari-$dat->bulan-$dat->tahun";
	
	if ($dat->syarikat=='') $dat->syarikat = '&nbsp;';
  ?>
  <tr>
    <td height="20" bgcolor="#FFFFFF" class="tableMainBodyFont" align="center"><?=$bil?></td>
    <td bgcolor="#FFFFFF" class="tableMainBodyFont"><?=$dat->name?></td>
    <td bgcolor="#FFFFFF" class="tableMainBodyFont"><?=$tarikh?>&nbsp;<?=$dat->jam?>:<?=$dat->minit?></td>
    <td bgcolor="#FFFFFF" class="tableMainBodyFont" align="center"><?=$dat->syarikat?></td>
    <td bgcolor="#FFFFFF" class="tableMainBodyFont" align="center"><?=$photo?></td>
  </tr>
  <?php 
$bil++;
} 
?>
</table>
</body></html>